<div class="page">
&nbsp;总${parameters.pager.totalRecords?string("0.#")}条记录&nbsp;共${parameters.pager.totalPages?string("0.#")}页&nbsp;&nbsp;
<#if 1==parameters.pager.currentPage>
	<a href="#">首 页</a>&nbsp;
 	<a href="#">上一页</a>&nbsp;
<#else>
	<a href="#" onClick="goto_page('1')">首 页</a>&nbsp;
 	<a href="#" onClick="goto_page('${(parameters.pager.currentPage-1)?string("0.#")}')">上一页</a>&nbsp;
</#if>
第<input id='_current_page_' size="3" value="${parameters.pager.currentPage?string("0.#")}">页&nbsp;<a href="#" onClick="jumpto_page();">跳转</a>&nbsp;
每页<input id='_page_size_' size="3" value="${parameters.pager.pageSize?string("0.#")}">条&nbsp;<a href="#" onClick="change_pageSize();">跳转</a>&nbsp;
<#if parameters.pager.currentPage==parameters.pager.totalPages>
 	<a href="#">下一页</a>&nbsp;
 	<a href="#">尾 页</a>
<#else>
 	<a href="#" onClick="goto_page('${(parameters.pager.currentPage+1)?string("0.#")}')">下一页</a>&nbsp;
 	<a href="#" onClick="goto_page('${parameters.pager.totalPages?string("0.#")}')">尾 页</a>
</#if> 
</div>
<script type="text/javascript"> 
    function goto_page(p){  
    	if(!isInt(p)){
    		p =1;
    	}
    	createHiddenCurrentPage(p);
    	createHiddenPageSize();
    	var search_form = document.getElementById("${parameters.formId}");
        search_form.submit();
    }  
    function createHiddenCurrentPage(p){
    	var search_form = document.getElementById("${parameters.formId}");
    	search_form['${parameters.pagerName}.currentPage'] = p; 
    	createHidden(search_form,'${parameters.pagerName}.currentPage',p);
    }
    function createHiddenPageSize(){
    	var search_form = document.getElementById("${parameters.formId}");
    	var pageSize = document.getElementById('_page_size_').value; 
    	if(!isInt(pageSize)){
    		pageSize = 1;
    	}
    	search_form['${parameters.pagerName}.pageSize'] = pageSize;
    	createHidden(search_form,'${parameters.pagerName}.pageSize',pageSize);
    }
    function createHidden(form,hiddenName,hiddenValue){
    	var hidden = document.createElement("input");
    	hidden.setAttribute("name",hiddenName);
    	hidden.setAttribute("value",hiddenValue);
    	hidden.setAttribute("type","hidden");
    	form.appendChild(hidden);
    }
    function jumpto_page(){
    	var cur = document.getElementById('_current_page_').value;
    	goto_page(cur);
    }
    function change_pageSize(){
    	createHiddenPageSize();
    	var cur = document.getElementById('_current_page_').value;
    	createHiddenCurrentPage(cur);
    	var search_form = document.getElementById("${parameters.formId}");
    	search_form.submit();
    }
    function isInt(v){
	    var vArr = v.match(/^[0-9]+$/);
	    if (vArr == null){
	        return false;
	    }else{
	        return true;
	    }
	}
</script>  